package com.liangtian.mdm.base.model;

import java.io.Serializable;
import java.util.Date;

public class BaseModel implements Serializable {
    private String order;//排序关键字
    private String sort; //升序  降序
    private Integer length; //每页显示条数
    private Integer start; //起始条数
    private Integer draw; //请求次数
    private Integer pageNum; //当前页数
    private Date beginDate;//开始时间，用于时间查询
    private Date endDate;//结束时间，用于时间查询

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public Integer getLength() {
        return length;
    }

    public void setLength(Integer length) {
        if (null != this.start) {
            this.pageNum = start/length + 1;
        }
        this.length = length;
    }

    public Integer getStart() {
        return start;
    }

    public void setStart(Integer start) {
        if (null != this.length) {
            this.pageNum = start/this.length + 1;
        }
        this.start = start;
    }

    public Integer getDraw() {
        return draw;
    }

    public void setDraw(Integer draw) {
        this.draw = draw;
    }
}
